<template>
  <div>
    App
    <button @click="getPosts">GET</button>
    <button @click="addPosts">POST</button>
    <button @click="putData">PUT</button>
    <button @click="deleteData">DELETE</button>
  </div>
</template>

<script>
import axios from "axios";

export default {
  name: "App",
  methods:{
    async getPosts(){
      try{
        const result = await axios.get(
          // "http://localhost:8080/api/admin/product/baseTrademark/3/7"
          "/api/admin/product/baseTrademark/1/140"
          );
        console.log(result.data);
      }catch(e){
        console.log(e);
      }
    },
    async addPosts(){
      console.log(12323);
      try{
        axios.post("/api/admin/product/baseTrademark/save",{
          tmName: '12315hhhh', 
          logoUrl: 'http://139.198.127.41:9000/sph/20240525/微信图片_20230920133300.jpg'
        });
      }catch(e){
        console.log(e);
      }
      
    },
    putData(){
     axios.put("/api/admin/product/baseTrademark/update",{
      id:"32235",
      tmName: "32235",
      logoUrl: "322353223532235322353223532235"
     })
    },
    async deleteData(){
      try{
        await axios.delete("/api/admin/product/baseTrademark/remove/32192");
      }catch(e){
        console.log(e);
      }
    },

  },
}
</script>

<style>

</style>>
